let fn = async ([obj, method, ...args], ctx, topic) => {
    try {
        let start = new Date()
        let result = await ctx[obj][method](...args)
        let during = new Date() - start
        return {
            sender: {name: 'inspector'},
            data: {
                result,
                during,
                cmd: [obj, method, args]
            }
        }
    } catch (e) {
        return {
            topic,
            data: e.message
        }
    }

}

fn.type = 'peer'

module.exports = fn